# 导包
import requests
import config

# 创建接口类
class LoginAPI:
    # 初始化
    def __init__(self):
        self.url_verify = config.BASE_URL + "/api/captchaImage"
        self.url_login = config.BASE_URL + "/api/login"
    # 获取图片验证码
    def get_verify_code(self):
        return requests.get(url=self.url_verify)

    # 登录
    def login(self, test_data):
        return requests.post(url=self.url_login, json = test_data)
